﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ECI.LIP.Utility
{
    public static class HTMLNodeReplace
    {
        public static string NodeReplace(this string strhtml, string[] arrayData)
        {

            Type nodeEnum = typeof(NodeReplace);

            int index = 0;
            foreach (string s in Enum.GetNames(nodeEnum))
            {
                strhtml = strhtml.Replace("{$" + s.ToLower() + "}", arrayData[index++]);
            }
            return strhtml;
        }
    }

    public enum NodeReplace
    {
        Title,
        Url
    }
}
